package city.spring.modules.material.repository;

import city.spring.modules.material.entity.MaterialdeliveryEntity;
import city.spring.modules.material.vo.MaterialdeliveryVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 存储库：物资出库
 *
 * @author 谢金婷
 * @date 2020-07-02 13:41:43
 */
@Repository
public interface MaterialdeliveryRepository extends BaseMapper<MaterialdeliveryEntity> {

    MaterialdeliveryEntity getById(String valueOf);

    IPage<MaterialdeliveryVO> listPage(Page<? extends MaterialdeliveryEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends MaterialdeliveryEntity> wrapper);

    /**
     * 出库单作废
     *
     * @param id
     * @param entity
     */
    void checkCancellation(String id, MaterialdeliveryEntity entity);
}